<?php


function lib_shopallclass(&$ctag,&$refObj){
	 global $dsql;
	 //属性处理
	$attlist="row|100,typeid|0";
    FillAttsDefault($ctag->CAttribute->Items,$attlist);
    extract($ctag->CAttribute->Items, EXTR_SKIP);
    
    $innertext = $ctag->GetInnerText();
    $where = " ishidden=0 AND reid=".$typeid;

    $query = "SELECT id,typename FROM `#@__arctype` WHERE ".$where." ORDER BY sortrank ASC LIMIT ".$row;
    $dsql->Execute('fs', $query);
    $html = '';
    while ($row = $dsql->GetArray('fs')){
    	$html .= '<li><strong><a href="/'.(($type=='brand') ? 'brand-' : 'list-').$row['id'].'.html" title="'.$row['typename'].'">'.$row['typename'].'</a></strong>';
    	$html .= '<div class="float-list-cont">';
    	$where = " ishidden=0 AND reid=".$row['id'];
    	$query = "SELECT id,typename FROM `#@__arctype` WHERE ".$where." ORDER BY sortrank ASC";
    	$dsql->Execute('me', $query);
    	while ($rows = $dsql->GetArray('me')){
    		$html .= '<a href="/'.(($type=='brand') ? 'brand-' : 'list-').$rows['id'].'.html" title="'.$rows['typename'].'">'.$rows['typename'].'</a>';
    	}
    	$html .= '</div></li>';
    	
    }
    return $html;
}
?>